Optimal. Leaf size=58 \[ -\frac {a \cos (c+d x)}{d}+\frac {b \cos ^2(c+d x)}{2 d}+\frac {a \cos ^3(c+d x)}{3 d}-\frac {b \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3957, 2916, 12,
780} \begin {gather*} \frac {a \cos ^3(c+d x)}{3 d}-\frac {a \cos (c+d x)}{d}+\frac {b \cos ^2(c+d x)}{2 d}-\frac {b \log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 780
Rule 2916
Rule 3957
Rubi steps
\begin {align*} \int (a+b \sec (c+d x)) \sin ^3(c+d x) \, dx &=-\int (-b-a \cos (c+d x)) \sin ^2(c+d x) \tan (c+d x) \, dx\\ &=\frac {\text {Subst}\left (\int \frac {a (-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac {\text {Subst}\left (\int \frac {(-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac {\text {Subst}\left (\int \left (a^2-\frac {a^2 b}{x}+b x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac {a \cos (c+d x)}{d}+\frac {b \cos ^2(c+d x)}{2 d}+\frac {a \cos ^3(c+d x)}{3 d}-\frac {b \log (\cos (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 57, normalized size = 0.98 \begin {gather*} -\frac {3 a \cos (c+d x)}{4 d}+\frac {a \cos (3 (c+d x))}{12 d}-\frac {b \left (-\frac {1}{2} \cos ^2(c+d x)+\log (\cos (c+d x))\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 47, normalized size = 0.81
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-\frac {a \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}}{d}\) | \(47\) |
default | \(\frac {b \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-\frac {a \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}}{d}\) | \(47\) |
risch | \(i b x +\frac {b \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {b \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {2 i b c}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}-\frac {3 a \cos \left (d x +c \right )}{4 d}+\frac {a \cos \left (3 d x +3 c \right )}{12 d}\) | \(90\) |
norman | \(\frac {-\frac {4 a}{3 d}-\frac {2 b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (4 a +2 b \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {b \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(120\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 47, normalized size = 0.81 \begin {gather*} \frac {2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (\cos \left (d x + c\right )\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.66, size = 49, normalized size = 0.84 \begin {gather*} \frac {2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (-\cos \left (d x + c\right )\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \sin ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 66, normalized size = 1.14 \begin {gather*} -\frac {b \log \left (\frac {{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac {2 \, a d^{2} \cos \left (d x + c\right )^{3} + 3 \, b d^{2} \cos \left (d x + c\right )^{2} - 6 \, a d^{2} \cos \left (d x + c\right )}{6 \, d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 45, normalized size = 0.78 \begin {gather*} -\frac {a\,\cos \left (c+d\,x\right )-\frac {a\,{\cos \left (c+d\,x\right )}^3}{3}-\frac {b\,{\cos \left (c+d\,x\right )}^2}{2}+b\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________